<template>
	<view>
		<view class="cu-modal" :class="modalName=='Image'?'show':''">
			<view class="cu-dialog">
				<view class="bg-img">
					<image class="image-style" src="../static/bg.jpg" mode="widthFix"></image>
					<view class="cu-bar justify-end text-white">
						<view class="action" @tap="hideModal">
							<text class="cuIcon-close "></text>
						</view>
					</view>
				</view>
				<view class="cu-bar bg-white">
					<view class="action margin-0 flex-sub  solid-left" @tap="hideModal">{{content}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'picture-modal',
		props: ['content', 'imgUrl', 'modalName'],
		data () {
			return {
				hideModal() {
					this.$emit('hideModal')
				}
			}
		}
	}
</script>

<style>
	.image-style {
		/* background-image: url('../static/bg.jpg'); */
		height:300px;
	}
</style>
